#include <algorithm>
#include <iostream>
#include <vector>

using namespace std;
class Solution{
public:
	void reverseString(vector<char>& s) {
        int i = 0;
        int j = s.size()-1;
        while(i < j){
            char tmp = s[i];
            s[i] = s[j];
            s[j] = tmp;
            i++;
            j--;
        }
    }
};

int main(){
	vector<char> nums = {'a','b','c','d','e'};
	Solution so;
	so.reverseString(nums);
	for(auto i : nums){
		cout << i << " ";
	}
	cout << endl;
	return 0;
}